<template>
  <el-card class="app-container">
    <c-u-r-d-table :option="option"/>
  </el-card>
</template>

<script>

import ColumnType from '@/framework/constant/ColumnType'
import { cartItemApi } from '@/feature/oms/infra/api/cartItemApi'
import CURDTable from '@/framework/components/table/CURDTable'

export default {
  components: { CURDTable },
  data() {
    return {
      option: {
        requestApi: cartItemApi,
        columns: [
          {
            label: '',
            prop: 'userId',
            searchable: true,
            type: ColumnType.SELECT
          },
          {
            label: '',
            prop: 'spuId',
            type: ColumnType.SELECT
          },
          {
            label: '',
            prop: 'skuId',
            type: ColumnType.SELECT
          },
          {
            label: '添加到购物车的价格，用于比价',
            prop: 'addedPrice'
          },
          {
            label: '购买数量',
            prop: 'num',
            type: ColumnType.NUMBER
          },
          {
            label: '销售属性',
            prop: 'salePropValues'
          },
          {
            label: '创建时间',
            type: ColumnType.DATETIME,
            hiddenInForm: true,
            prop: 'gmtCreate'
          },
          {
            label: '修改时间',
            type: ColumnType.DATETIME,
            hiddenInForm: true,
            prop: 'gmtModified'
          }
        ]
      }
    }
  },
  methods: {}
}
</script>

